package com.port.eleport.model.plat;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.port.eleport.model.base.IdEntity;

/**
 * 商品
 * 
 * @author jameschen
 */
@Entity
@Table(name = "plat_product", schema = "")
@DynamicInsert(true)
@DynamicUpdate(true)
public class TProduct extends IdEntity {
	/**
	 * 商品名称
	 */
	@Column(name = "product_name")
	private String productName;

	/**
	 * 规格
	 */
	@Column(name = "specification_")
	private String specification;

	/**
	 * HS编码
	 */
	@Column(name = "hsno_")
	private String hsno;

	/**
	 * 行邮税名称Line post tax
	 */
	@Column(name = "line_post_tax")
	private String linePostTax;

	/**
	 * 行邮税号
	 */
	@Column(name = "tax_no")
	private String taxNo;
	/**
	 * 行邮税率
	 */
	@Column(name = "tax_rate")
	private BigDecimal taxRate;
	
	/**
	 * 商品零售价
	 */
	@Column(name = "price_")
	private BigDecimal price;
	/**
	 * 备案单位
	 */
	@Column(name = "unit_")
	private String unit;
	/**
	 * 毛重
	 */
	@Column(name = "rough_weight")
	private String roughWeight;
	/**
	 * 净重
	 */
	@Column(name = "net_weight")
	private String netWeight;

	/**
	 * 平台归属
	 */
	@Column(name = "platform_")
	private String platform;

	/**
	 * 属于商家
	 */
	@ManyToOne
	@JoinColumn(name = "merchant_id")
	private TMerchant merchant;
	
	@OneToOne
	@PrimaryKeyJoinColumn
	private TRecord record;

	public TRecord getRecord() {
		return record;
	}

	public void setRecord(TRecord record) {
		this.record = record;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public String getSpecification() {
		return specification;
	}

	public void setSpecification(String specification) {
		this.specification = specification;
	}

	public String getHsno() {
		return hsno;
	}

	public void setHsno(String hsno) {
		this.hsno = hsno;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public String getRoughWeight() {
		return roughWeight;
	}

	public void setRoughWeight(String roughWeight) {
		this.roughWeight = roughWeight;
	}

	public String getNetWeight() {
		return netWeight;
	}

	public void setNetWeight(String netWeight) {
		this.netWeight = netWeight;
	}

	public String getPlatform() {
		return platform;
	}

	public void setPlatform(String platform) {
		this.platform = platform;
	}

	public TMerchant getMerchant() {
		return merchant;
	}

	public void setMerchant(TMerchant merchant) {
		this.merchant = merchant;
	}

}
